# SPDX-License-Identifier: Apache-2.0
"""
remove_organization_project_is_active

Revision ID: b08bcde4183c
Revises: 94c844c2da96
Create Date: 2022-05-24 19:22:41.034512
"""

import sqlalchemy as sa

from alembic import op

revision = "b08bcde4183c"
down_revision = "94c844c2da96"

# Note: It is VERY important to ensure that a migration does not lock for a
#       long period of time and to ensure that each individual migration does
#       not break compatibility with the *previous* version of the code base.
#       This is because the migrations will be ran automatically as part of the
#       deployment process, but while the previous version of the code is still
#       up and running. Thus backwards incompatible changes must be broken up
#       over multiple migrations inside of multiple pull requests in order to
#       phase them in over multiple deploys.


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("organization_project", "is_active")
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "organization_project",
        sa.Column(
            "is_active",
            sa.BOOLEAN(),
            server_default=sa.text("false"),
            autoincrement=False,
            nullable=False,
        ),
    )
    # ### end Alembic commands ###
